package com.ifcar.app.bean;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Map;

public class DetailPageBean implements Serializable{
	
	private static final long serialVersionUID = 664044852448656050L;
	public static long ExpiredDuration = 2*24*60*60*1000;
	public static long StutusExpiredDuration = 5*24*60*60*1000;
	Map<String, Object> data = null;

	public Map<String, Object> getData() {
		return data;
	}

	public void setData(Map<String, Object> data) {
		this.data = data;
	}
	
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
	public static boolean isExpired(String myDate) {
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		
		try {
			java.util.Date date=df.parse(myDate);
			long l=System.currentTimeMillis()-date.getTime();
			if(l >= ExpiredDuration) {
				return true;
			} else {
				return false;
			}
		} catch (Exception e) {
			// TODO Auto-generated catch block
			return false;
		}
	}
	
	public static void setExpiredDuration(long duration) {
		ExpiredDuration = duration;
	}

}
